package pl.perseus.action;

import lombok.Getter;
import lombok.Setter;

import org.springframework.beans.factory.annotation.Autowired;

import pl.perseus.model.Classes;
import pl.perseus.service.classes.IClassesService;

public class AddClassesAction extends BaseAction {

	@Autowired
	IClassesService service;
	
	@Getter
	@Setter
	private Classes classes;
	
	@Override
	public String execute() {
		classes.setActive(true);
		service.insertClasses(classes);
		logAction("Adding classes " + classes.getClassname());
		return SUCCESS;
	}

}
